set number
set ruler
set noundofile
set showcmd
set tabstop=4
set shiftwidth=4
set cursorline
set shortmess+=I
set fdm=marker
set relativenumber
set nowrap
set nohlsearch
set fileencodings=utf-8,usc-bom,gb18030,gbk,gb2312,cp936
set showtabline=2
set noshowmode

filetype plugin indent on
syntax enable

command! Q q
command! W w
command! Wq wq
command! WQ wq
command! Wa wa
command! WA wa
command! Qa qa
command! QA qa

nnoremap <C-S> :w<CR>
inoremap <C-S> <ESC>:w<CR>
nnoremap <C-Q> :q<CR>
nnoremap <C-W> :w<CR>
inoremap <C-W> <ESC>:w<CR>

inoremap jj <ESC>
inoremap JJ <ESC>
inoremap <C-Q> <ESC>

nnoremap J 5j
nnoremap K 5k
nnoremap H 5h
nnoremap L 5l
nnoremap u k

vnoremap J 5j
vnoremap K 5k
vnoremap H 5h
vnoremap L 5l
vnoremap u k

nnoremap <leader>y "+yy
vnoremap <leader>y "+y
nnoremap <leader>p "+p
nnoremap <leader>d "+dd
vnoremap <leader>d "+d

noremap <C-F> <Right>
noremap <C-B> <Left>

nnoremap <Space>xi viws
nnoremap <Space>eu :undo<CR>
nnoremap <Space>er :redo<CR>

" 缩进
nnoremap < <<_
xnoremap < <gv
nnoremap > >>_
xnoremap > >gv

nnoremap s "_s
vnoremap O "_s
vnoremap <Backspace> "_x
